Skip to content

#58 - Mark the classes not meant to be extended @final and the infrastructure classes @internal - #61

Merged
njoubert-cleverage merged 1 commit into
mainfrom
58
Oct 19, 2026
Merged

njoubert-cleverage merged 1 commit into
mainfrom
58

Conversation

@njoubert-cleverage

Copy link
Copy Markdown
Member

Description

Fixes #58. Same model as cleverage/process-bundle#279: annotations only, so that the classes not meant to be extended can become final in 4.0.

  • @final since 3.3 (final in 4.0): FileFetchTask, ListContentTask, RemoveFileTask, CleverAgeFlysystemProcessBundle. Extending them triggers a deprecation with the Symfony DebugClassLoader.
  • @internal: CleverAgeFlysystemProcessExtension.
  • Once FileFetchTask is @final, PHPStan reports that the protected doFileCopy() never returns bool nor null. The return type is kept (a subclass may still override the method in 3.x, narrowing it would be a BC break) with an inline @phpstan-ignore, to be narrowed in 4.0.

Checked in the container (composer update, PHP 8.5): PHPUnit with pcov, PHPStan, PHP-CS-Fixer and Rector OK.

Requirements

  • Documentation updates
    • Reference
    • Changelog
  • Unit tests

Breaking changes

None in 3.3: annotations only (extending a @final class triggers a deprecation). Major (4.0): the @final classes become final, the @internal classes are not covered by the BC promise.

🤖 Generated with Claude Code

…tructure classes @internal

- @Final since 3.3 (final in 4.0): FileFetchTask, ListContentTask,
  RemoveFileTask, CleverAgeFlysystemProcessBundle. Extending them triggers a
  deprecation with the Symfony DebugClassLoader.
- @internal: CleverAgeFlysystemProcessExtension.
- FileFetchTask::doFileCopy() never returns bool nor null, which PHPStan
  reports once the class is @Final: the protected return type is kept (a
  subclass may override it) and will be narrowed in 4.0.
- Same model as cleverage/process-bundle#279.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@njoubert-cleverage
njoubert-cleverage merged commit a8f98ab into main Oct 19, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Define the public API: mark classes @final or @internal

1 participant